// run: $exec < input
#include <iostream>
#include <algorithm>
#include <vector>

int const maxn = 100007;

std::vector<int> height;
int ans[maxn];

int main()
{
	int n;
	std::cin >> n;
	height.resize(n);
	for (int i = 0; i < n; i++) std::cin >> height[i];
	int max = 0;
	for (int i = n - 1; i >= 0; i--) {
		if (height[i] > max) ans[i] = 0;
		else				 ans[i] = max - height[i] + 1;
		max = std::max(max, height[i]);
	}
	std::cout << ans[0];
	for (int i = 1; i < n; i++)
		std::cout << ' ' << ans[i];
	std::cout << '\n';
}

